<?php 
// Lay cac thong so cau hinh chung
include "../../app_global.php";
// Lay cac hang so dung chung
include "../../const.php";
// Ham thuc hien lay ten file va hien thi noi dung
include "../../isa-lib/isa-function/isa_public_function.php";
require_once("../../isa-lib/nusoap/nusoap.php");
include "../../isa-lib/isa-function/prax.php";
//Ham thuc hien tao cay
include_once("../../isa-lib/isa-function/class_xslt.php");
// Kiem tra NSD da login hay qua timeout chua
include "../../test_login.php";
//Lay cac thong so de ket noi voi CSDL
include "../../connect.php";
include "../../connect_ado.php";
// Lay cac thong so cau hinh rieng cho chuc nang nay
include "../../onegate_function.php";
// Khoi tao cac bien SESSION chua quyen modul, function cua NSD
include "../../init_session.php";
include "app_local.php";
include "const.php";
include "approving_net_function.php";
include "../receive/const.php";
// Lay cac hang so cua chuc nang nay
if (!isset($_REQUEST['modal_dialog_mode'])) {
	include "../../dsp_header.php";
}else{
	include "../../dsp_modal_dialog_header.php";
}
?>
<script src="../../isa-lib/isa-js/isa_util.js" ></script>
<script src="../handle/js_record_handle.js" ></script>
<script src="../receive/js_record.js"></script>
<script src="../receive/js_calendar.js" ></script>
<script src="js_approving_net.js"></script>
<?php
//echo $fuseaction;
switch($fuseaction) {
	case "DISPLAY_ALL_NET_RECORD_FOR_APPROVING";
		$v_status_list = "0,2,3";
		$v_fuseaction_onclick = "DISPLAY_SINGLE_NET_RECORD_FOR_APPROVING";
		$v_title = CONST_NET_RECORD_FOR_APPROVING_TITLE;
		$v_show_date = false;
		$v_receive_date = "";
		include "../record-lib/qry_all_recordtype_by_staff.php";
		include "../customer/qry_all_record.php";
		include "../customer/dsp_all_record.php";
		break;
	case "DISPLAY_ALL_NET_RECORD_OFFICIAL_RECEIVE";
		$v_status_list = "1";
		$v_fuseaction_onclick = "DISPLAY_SINGLE_NET_RECORD_FOR_OFFICIAL_RECEIVE";
		$v_title = CONST_NET_RECORD_OFFICIAL_RECEIVE_TITLE;
		$v_show_date = false;
		$v_receive_date = "";
		include "../record-lib/qry_all_recordtype_by_staff.php";
		include "../customer/qry_all_record.php";
		include "../customer/dsp_all_record.php";
		break;
	case "DISPLAY_ALL_NET_RECORD_OFFICIALED_RECEIVE";
		$v_status_list = "9";
		$v_fuseaction_onclick = "DISPLAY_SINGLE_NET_RECORD_FOR_VIEW";
		$v_title = CONST_NET_RECORD_OFFICIALED_RECEIVE_TITLE;
		$v_show_date = false;
		$v_receive_date = "";
		include "../record-lib/qry_all_recordtype_by_staff.php";
		include "../customer/qry_all_record.php";
		include "../customer/dsp_all_record.php";
		break;	
	case "DISPLAY_SINGLE_NET_RECORD_FOR_APPROVING";
		$v_check_worktype = "APPROVING";
		$v_title = CONST_NET_RECORD_APPROVING_TITLE;		
		include "../customer/qry_single_record.php";
		include "../customer/dsp_single_customer_record.php";
		break;
	case "DISPLAY_SINGLE_NET_RECORD_FOR_OFFICIAL_RECEIVE";
		$v_check_worktype = "OFFICIAL_RECEIVE";
		$v_title = CONST_NET_RECORD_OFFICIAL_RECEIVED_TITLE;		
		include "../customer/qry_single_record.php";
		include "../customer/dsp_single_customer_record.php";
		break;
	case "DISPLAY_SINGLE_NET_RECORD_FOR_VIEW";
		$v_check_worktype = "APPROVED";
		$v_title = CONST_NET_RECORD_VIEW_TITLE;		
		include "../customer/qry_single_record.php";
		include "../customer/dsp_single_customer_record.php";
		break;
	case "UPDATE_NET_RECORD_FOR_APPROVING";
		$v_check_worktype = "APPROVING";
		include "act_update_net_record.php";
		break;
	case "UPDATE_NET_RECORD_FOR_OFFICIAL_RECEIVE";
		$v_check_worktype = "OFFICIAL_RECEIVE";
		include "act_update_net_record.php";
		break;
	//Cap nhat ho so goc (lay tu receive)
	case "DISPLAY_SINGLE_RECORD";
		include "../record-lib/qry_single_record.php";
		include "../record-lib/dsp_single_record.php";
		break;
	case "UPDATE_RECORD";
		include "../receive/act_update_record.php";
		break;	
	default:
		$v_status_list = "0,2,3";
		$v_fuseaction_onclick = "DISPLAY_SINGLE_NET_RECORD_FOR_APPROVING";
		$v_title = CONST_NET_RECORD_FOR_APPROVING_TITLE;
		$v_show_date = false;
		$v_receive_date = "";
		include "../record-lib/qry_all_recordtype_by_staff.php";
		include "../customer/qry_all_record.php";
		include "../customer/dsp_all_record.php";
		break;
}
include "../../disconnect.php";
if (!isset($_REQUEST['modal_dialog_mode'])) {
	include "../../dsp_footer.php";
}else{
	include "../../dsp_modal_dialog_footer.php";
}?>